import yagmail,logging,yaml

def set_log():
    logging.basicConfig(filename='./com.kongfuzi.txt',filemode='w+',level=logging.DEBUG,format='%(levelno)s -> %(asctime)s ->%(message)s ')

def send_mail(filename):
    mail = yagmail.SMTP(user='774877770@qq.com',password='fjvmkwjdijkfbajg',host='smtp.filename')
    mail.send(to='1522057104@qq.com',subject='孔夫子测试报告',contents='报告内容',attachments='filename')